package model;

/**
 * This class tests the gameplay mechanics of the Table class.
 * This test can be done in console mode without using the client or server.
 */

import model.user.User;
import model.user.UserBank;
import model.user.UserSettings;
import model.user.UserStatistics;
import model.user.User.Gender;
import model.user.User.Ranking;

public class TableTest {
	public static void main(String[] args ){
		//create the new table
		Table table1 = new Table("table1");
		
		//create user and players and add them to table1
		UserSettings ricSettings = new UserSettings("email", "ric", "caimano", Gender.MALE, 20, "QC");
		User rcaimano = new User("ric", "ric", ricSettings, new UserStatistics(), new UserBank());
		Player ric = new Player(rcaimano, 200, table1);
		table1.addPlayer(ric);
				
		UserSettings karanSettings = new UserSettings("email", "karan", "shahani", Gender.MALE, 20, "QC");
		User kshahani = new User("karan", "karan", karanSettings, new UserStatistics(), new UserBank());
		Player karan = new Player(kshahani, 200, table1);
		table1.addPlayer(karan);
				
		UserSettings kevinSettings = new UserSettings("email", "kevin", "han", Gender.MALE, 20, "QC");
		User khan = new User("kevin", "kevin", kevinSettings, new UserStatistics(), new UserBank());
		Player kevin = new Player(khan, 200, table1);
		table1.addPlayer(kevin);
		
		//set players to active
		table1.initialiseHand();
		
		//deal all cards
		table1.playHand();
		System.out.println(table1.playersHands());
		
		//test removing a player
		table1.removePlayer(kevin);
		
		//set players to active
		table1.initialiseHand();
		
		//deal all cards
		table1.playHand();
		System.out.println(table1.playersHands());
	}
}
